﻿<%@ Page Title="Dash Board" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AmkeniCrossLoginApplication.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<title title="Dash Board">Dash Board</title>

    <style type="text/css">

        .table {
            width: 90%;
            border-top: 1px solid #e5eff8;
            border-right: 1px solid #e5eff8;
            margin: 1em auto;
            border-collapse: collapse;
        }
        td {
            color: #678197;
            border-bottom: 1px solid #e5eff8;
            border-left: 1px solid #e5eff8;
            padding: .3em 1em;
            text-align: center;
        }

        #wrapper {
                width: 1005px;
                margin: 0 0 .75em;
        }
        #leftcolumn, #rightcolumn {
            border: 1px solid white;
            float: left;
            min-height: 250px;
            color: GrayText;
        }
        #leftcolumn {
                width: 500px;
                background-color: none;
        }
        #rightcolumn {
                width: 500px;
                background-color: none;
        }

    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div style="margin:2px,2px,2px,2px;">
        <asp:SiteMapPath ID="SiteMapPath1" runat="server" ForeColor="#999999"></asp:SiteMapPath>
    </div>

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

    <asp:EntityDataSource ID="CallDataSource" runat="server" ConnectionString="name=Amkeni_DatabaseEntities" DefaultContainerName="Amkeni_DatabaseEntities" EnableFlattening="False" EntitySetName="RFPs" Select="it.[RFP_id], it.[RFP_name]"></asp:EntityDataSource>
    <asp:EntityDataSource ID="YearDataSource" runat="server" ConnectionString="name=Amkeni_DatabaseEntities" DefaultContainerName="Amkeni_DatabaseEntities" EnableFlattening="False" EntitySetName="years" Select="it.[year_id], it.[year1]"></asp:EntityDataSource>
    <asp:EntityDataSource ID="ReporPeriodDataSource" runat="server" ConnectionString="name=Amkeni_DatabaseEntities" DefaultContainerName="Amkeni_DatabaseEntities" EnableFlattening="False" EntitySetName="report_period" Select="it.[report_period_id], it.[period]"></asp:EntityDataSource>

    <div id="wrapper">
        <div id="leftcolumn">
            <asp:Table ID="Table1" runat="server">
                <asp:TableRow>
                    <asp:TableCell style="width:100px;height:100px;">
                        <asp:ImageButton ID="QuarterlyReportsButton" runat="server" 
                            ImageUrl="~/Styles/SImages/Saved-reports-icon.png" OnClick="QuarterlyReportsButton_Click" />
                        <br />
                        <asp:Label ID="Label1" runat="server" Text="IP QUARTERLY REPORTING SYSTEM"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:ImageButton ID="AgreementsButton" runat="server" 
                            ImageUrl="~/Styles/SImages/Archived-report-icon.png" OnClick="AgreementsButton_Click" />
                            <br />
                        <asp:Label ID="Label2" runat="server" Text="IP M&E SYSTEM"></asp:Label>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </div>

        <asp:Panel ID="Dash" runat="server">
        <div id="rightcolumn">
            <asp:Table ID="Table2" runat="server">
                <asp:TableHeaderRow>
                    <asp:TableHeaderCell ColumnSpan="3">
                        <asp:Label ID="Label3" runat="server" Text="Generate Specific Reports"></asp:Label>
                    </asp:TableHeaderCell>
                </asp:TableHeaderRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="Label4" runat="server" Text="Call"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:DropDownList ID="CallList" runat="server" DataSourceID="CallDataSource" 
                            DataTextField="RFP_name" DataValueField="RFP_id" AppendDataBoundItems="true">
                            <asp:ListItem Enabled="true" Text="Select a Call" Value="n/a" Selected="True" />
                        </asp:DropDownList>
                        &nbsp
                        <asp:RequiredFieldValidator ID="RF1" runat="server" ErrorMessage="**" ForeColor="Red"
                            ControlToValidate="CallList" InitialValue="n/a" ValidationGroup="report" 
                            SetFocusOnError="true"></asp:RequiredFieldValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="Label5" runat="server" Text="Year"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:DropDownList ID="YearList" runat="server" DataSourceID="YearDataSource" 
                            DataTextField="year1" DataValueField="year_id" AppendDataBoundItems="true">
                            <asp:ListItem Enabled="true" Text="Select the Year" Value="n/a" Selected="True" />
                        </asp:DropDownList>
                        &nbsp
                        <asp:RequiredFieldValidator ID="RF2" runat="server" ErrorMessage="**" ForeColor="Red"
                            ControlToValidate="YearList" InitialValue="n/a" ValidationGroup="report" 
                            SetFocusOnError="true"></asp:RequiredFieldValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="Label6" runat="server" Text="Report Period"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:DropDownList ID="ReportPeriodList" runat="server" DataSourceID="ReporPeriodDataSource" 
                            DataTextField="period" DataValueField="report_period_id" AppendDataBoundItems="true">
                            <asp:ListItem Enabled="true" Text="Select Report Period" Value="n/a" Selected="True" />
                            <asp:ListItem Enabled="true" Text="All Quarters" Value="5" />
                        </asp:DropDownList>
                        &nbsp
                        <asp:RequiredFieldValidator ID="RF3" runat="server" ErrorMessage="**" ForeColor="Red"
                            ControlToValidate="ReportPeriodList" InitialValue="n/a" ValidationGroup="report" 
                            SetFocusOnError="true"></asp:RequiredFieldValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="Label7" runat="server" Text="Report Type"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:DropDownList ID="ReportTypeList" runat="server" AppendDataBoundItems="true">
                            <asp:ListItem Enabled="true" Text="Select Report Type" Value="n/a" Selected="True" />
                            <asp:ListItem Enabled="true" Text="Narrative Report" Value="1" />
                            <asp:ListItem Enabled="true" Text="Results Report" Value="2" />
                            <asp:ListItem Enabled="true" Text="M&E Report" Value="3" />
                            <asp:ListItem Enabled="true" Text="Success Story Report" Value="4" />
                            <asp:ListItem Enabled="true" Text="Upcoming Activity Report" Value="5" />
                            <asp:ListItem Enabled="true" Text="Risk and Mitigation Report" Value="6" />
                            <asp:ListItem Enabled="true" Text="IP Photographs Report" Value="7" />
                        </asp:DropDownList>
                        &nbsp
                        <asp:RequiredFieldValidator ID="RF4" runat="server" ErrorMessage="**" ForeColor="Red"
                            ControlToValidate="ReportTypeList" InitialValue="n/a" ValidationGroup="report" 
                            SetFocusOnError="true"></asp:RequiredFieldValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell></asp:TableCell>
                    <asp:TableCell>
                        <asp:Button ID="GenerateReportButton" runat="server" Text="Generate Report" 
                            OnClick="GenerateReportButton_Click" ValidationGroup="report" />
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </div>
    </div><br />

    <%--<div><div style="color:red">1.Statistics of submitted reports vs approved reports vs draft reports vs final reports</div></div>
    <div><div style="color:red">2.Statistics of expenditure per call</div> maybe per IP as well?</div>
    <div><div style="color:red">3.Statistics of project/IP implementation status of results i.e. average btwn delayed, on track and completed</div></div>
    <div><div style="color:red">4.Summary of the Total Beneficiaries reached, Disaggregated by call</div></div>
    <div><div style="color:red">5.Summary of status of project results implementiation by call using a bar graph.</div></div>
    <div><div style="color:red">6.Display of IPs by call.<br /></div></div>--%>

    <div style="padding-top:20px;padding-bottom:20px;">
        <asp:Table ID="CallTable" runat="server" CssClass="table">
            <asp:TableHeaderRow>
                <asp:TableHeaderCell Text="Summary of Expenditure Per Call"></asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableRow ID="CallTableRow" runat="server"></asp:TableRow>
        </asp:Table>
    </div>

    <div style="width:900px;padding-top:20px;padding-bottom:20px;">
        <div style="float:left;">
            <asp:Table ID="ProjectImplementationTable" runat="server">
                <asp:TableHeaderRow>
                    <asp:TableHeaderCell ID="ImplementationHeader" Text="Summary of Project Implementiation Status Per Implementing Partner">
                    </asp:TableHeaderCell>
                </asp:TableHeaderRow>
                <asp:TableRow ID="ImplementationCallRow" runat="server"></asp:TableRow>
            </asp:Table>
        </div>
        <div style="float:right;">
            <asp:Table ID="ReportStatusTable" runat="server">
                <asp:TableHeaderRow>
                    <asp:TableHeaderCell ColumnSpan="2" Text="Summary of Report Status Per Implementing Partner"></asp:TableHeaderCell>
                </asp:TableHeaderRow>
                <asp:TableRow ID="savedRow" runat="server">
                    <asp:TableCell>
                        Saved Reports
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow ID="submittedRow" runat="server">
                    <asp:TableCell>
                        Submitted Reports
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow ID="approvedRow" runat="server">
                    <asp:TableCell>
                        Approved Reports
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow ID="archivedRow" runat="server">
                    <asp:TableCell>
                        Archived Reports
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </div>
    </div>
    <div style="padding-top:20px;padding-bottom:20px;">
        <asp:Table ID="ImplementingPartnersTable" runat="server">
            <asp:TableHeaderRow>
                <asp:TableHeaderCell ID="ipHeaderCell" runat="server" Text="Implementing Partner Per Call"></asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableRow ID="ipRow" runat="server"></asp:TableRow>
        </asp:Table>
    </div>
    <div style="padding-top:20px;padding-bottom:20px;">
        <asp:Table ID="BeneficiariesTable" runat="server">
            <asp:TableHeaderRow ID="headerRow" runat="server">
                <asp:TableHeaderCell ID="headerRowCell" runat="server" Text="Summaries of project beneficiaries per Call"></asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableRow ID="beneficariesRow" runat="server"></asp:TableRow>
        </asp:Table>
    </div>
    <div style="padding-top:20px;padding-bottom:20px;">
        <asp:Table ID="ProjectProgressBarChartTable" runat="server" CssClass="table">
            <asp:TableHeaderRow>
                <asp:TableHeaderCell Text="Summary of Project Progress Per Call"></asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableRow ID="BarChartTableRow" runat="server"></asp:TableRow>
        </asp:Table>
    </div>
    </asp:Panel>
</asp:Content>
